1. Field of the Invention
The present invention relates generally to software objects, and in particular, to a method, apparatus, and article of manufacture for defining the scale of reusable geometric content for computer programs.
2. Description of the Related Art
The use of Computer Assisted Drafting (CAD) application programs is well known in the art. Some CAD programs provide templates and palettes that help users create documents, graphical presentations, etc. However, these templates and palettes provide only limited assistance and does little to help the user connect standard CAD components, define new components, or define methods of manipulating the components within the CAD program.
Most standard components are predefined by the CAD program itself, or are created by third-party programmers, e.g., clip art, etc., leaving little room for the user to define custom shapes without using the predefined standard components as building blocks.
Using clip art as an example, clip art is typically a graphical representation of an object, person, etc., that can be sized and reused in various circumstances to create a presentation or other graphical display. Clip art is typically used in combination with other graphic objects, including additional clip art, to satisfy some task, e.g., the creation of a report, flyer, schematic drawing, presentation, etc.
Clip art, however, is typically defined in a unitless manner and scaled to fit a frame defined by the user, or the frame is sized to fit the clip art geometry.
A broader definition of a component is typically referred to as xe2x80x9cshape object.xe2x80x9d Although a shape object includes graphics such as clip art, shape objects can also be graphics that are drawn-to-scale for use in mechanical or architectural drawings. Shape objects can also have properties that identify a real-world object. There can be intelligence in the shape objects, so that the shape object knows how to respond to user actions, including changing form. However, a reusable shape object cannot be scaled as easily as clip art can, since a reusable shape object has internal units and scale factors that may not match up with the user""s present drawing. For example, clip art is done based upon the size it should appear on the printed page. The clip art author is primarily concerned with making the graphic look good when viewed in a report or presentation. The user resizes the clipart to the printed page boundaries when the user""s needs are slightly different from what the author anticipated.
Geometry, shape object or otherwise, that is sized to the printed page is generally not useful when constructing drawings that represent a mechanical assembly, architectural floor plan, factory setup, etc. A common approach for this is for the drawing application to either be unitless or to choose an absolute system of units.
In the unitless case, convention and process dictates the units to be used within a company or industry. For example, a company may decide to standardize on meters, meaning that all geometry must be authored in meters before it can be used. This may mean that units obtained from content provided will need to be converted before use in a drawing.
A drawing program that uses an absolute system of units dictates that all drawings, and therefore all content, must be written with a particular set of units. The chosen drawing program may provide the illusion that the user is working in his units of choice, but this is achieved by converting all numbers from the absolute system of units to the user""s system of units on the fly. This approach leads to less accurate results than would be achieved in a unitless situation.
A shape object is the basic building block needed to create a reusable graphical object with intelligent behaviors. Another object, called the content object, is used to capture graphical objects for use with many drawings and transport graphical objects from one drawing to another. The content object is able to transport all graphical objects, including clipart, shapes, curves and text. The content object is never present in a drawing, but instead encapsulates all of the functionality needed to create reusable graphical objects and transport graphical objects. The common denominator of these two uses is that the content object is able to merge graphical objects into a destination drawing without knowing in advance the characteristics of the destination drawing.
Content needs to be flexible enough to adapt to many user""s needs. Some users may prefer to work in inches, while others work in centimeters. Further, some users may prefer to print in one scale, while other users need the same drawing in another scale for ease of transportation or other purposes. For example, one user may work in inches to create a graphical representation of a real world object. If that user then needs to copy that graphical representation into a drawing created in centimeters, then the content object needs to know how to transport the geometry without knowing the destination. Currently, content cannot adapt to these different situations.
It can be seen, then that there is a need for shape objects that can address the problems associated with unitless and absolute unit systems. It can also be seen that there is a need for content object that can be used to capture graphical objects without knowing the characteristics of the units and scale of the destination drawing. It can also be seen that there is a need for shape objects that can be adapted to different situations based on user inputs.
To address the requirements described above, the present invention discloses a method, apparatus, and article of manufacture for enabling the creation of software content objects for displaying information on a monitor attached to a computer. The method comprises the steps of creating a unit system of the shape object, creating a scale method property of the shape object, authoring the shape object in the unit system and producing a graphical output therefrom, and selectively modifying the graphical output of the shape object based on the unit system and the scale method property to display desired information on the monitor.